import xadmin

from .models import MachinePO, DebugLogPO


class MachinePOAdmin(object):
    list_display = ['id', 'booleanField', 'ip_address', 'name',  'machineID',  'remark', 'add_time', 'update_time']
    search_fields = ['id', 'booleanField', 'ip_address', 'name',  'machineID',  'remark']
    list_filter = ['id', 'booleanField', 'ip_address', 'name',  'machineID',  'remark', 'add_time', 'update_time']


class DebugLogPOAdmin(object):
    list_display = ['id', 'booleanField', 'name', 'problem_description', 'remark', 'update_time', 'add_time']
    search_fields = ['id', 'booleanField', 'name',  'remark']
    list_filter = ['id', 'booleanField', 'name', 'problem_description',   'remark', 'update_time', 'add_time']

    style_fields = {"problem_description": "ueditor"}

xadmin.site.register(MachinePO, MachinePOAdmin)
xadmin.site.register(DebugLogPO, DebugLogPOAdmin)